package com.jcgyl.export.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.jcgyl.export.entity.Tbgoodsinfo;
import com.jcgyl.export.model.SystemConstants;
import com.jcgyl.export.service.RedisService;

@Component
public class GoodsHelper {
	@Autowired
	private static RedisService redisService;

	@Autowired
	public void setredisService(RedisService _redisService) {
		redisService = _redisService;
	}

	public static Tbgoodsinfo GetGoodsInfo(String name) {

		Tbgoodsinfo goods = null;
		Object obj = redisService.get(SystemConstants.GoodsInfo_Prefix + ":" + name);
		if (obj != null)
			goods = (Tbgoodsinfo) obj;
		return goods;
	}
}
